﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyQuangCao
{
    public partial class frmQC_2 : Form
    {
        string fDate ="";
        string tDate = "";
        public frmQC_2()
        {
            InitializeComponent();
        }

        private void frmQC_2_Load(object sender, EventArgs e)
        {
            //setdata();
        }
        private DataSet ds = new DataSet();
        private void setdata()
        {

            //string sql = "select * from lichsugia";
            //frmChinh.me.cn1.laydulieu(sql, frmChinh.me.sqlcon, ds, "lichsugia");
            //dataGridView1.DataSource = ds;
            //dataGridView1.DataMember = "lichsugia";


        }

        private void btnBC_Click(object sender, EventArgs e)
        {

            //setdata();
        }

        private void dt2_ValueChanged(object sender, EventArgs e)
        {

        }

        private void dtpkToDate_FormatChanged(object sender, EventArgs e)
        {

        }

        private void dtpkToDate_KeyPress(object sender, KeyPressEventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            fDate = dtpkFDate.Value.ToShortDateString();
            tDate = dtpkToDate.Value.ToShortDateString();
            string sql = "SET DATEFORMAT DMY select * from lichsugia where ngay_cuoi between '" + fDate + "' and '" + tDate + "'";
            frmChinh.me.cn1.laydulieu(sql, frmChinh.me.sqlcon, ds, "lichsugia");
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = "lichsugia";
        }
    }
}
